{include file="header.html"}
<script type="text/javascript">
//<!CDATA[
$(function(){
	$('#valid_time').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true,changeYear: true});	   
    $('#pointcard_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            batch_no : {
                required : true
            },
            create_number : {
                required : true,
                number: true,
                max: 10000
            },
            valid_time : {
				required : true,
				date:true
            }
        },
        messages : {
            valid_time  : {
                required   : '请选择卡有效日期',
                date   : '卡有效日期填写错误'
            },
            create_number : {
                required : '生成数量不能为空',
                number: '生成数量填写错误',
                max: '生成数量不能大于10000'
            },
            batch_no  : {
                required   : '请填写批次号'
            }
        }
    });
});
//]]>
</script>
<div id="rightTop">
  <p>{$lang.pointcard_manage}</p>
  <ul class="subnav">
    <li><a class="btn1" href="index.php?app=pointcard">{$lang.manage}</a></li>
    <li><span>添加卡</span></li>
  </ul>
</div>
<div class="info">
  <form method="post" id="pointcard_form">
    <table class="infoTable">
      <tr>
        <th class="paddingT15"> {$lang.batch_no}:</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" type="text" name="batch_no" value="" /></td>
      </tr>
      <tr>
        <th class="paddingT15"> {$lang.create_number}:</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" type="text" name="create_number" value="" /></td>
      </tr>
      <tr>
        <th class="paddingT15"> {$lang.denomination}:</th>
        <td class="paddingT15 wordSpacing5"><select name="denomination">
					{foreach key=key item=item from=$cfg_pointcard.denomination}
            <option value="{$key}">{$item}</option>
					{/foreach}
					
          </select></td>
      </tr>
      <tr>
        <th class="paddingT15"> {$lang.valid_time}:</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2 pick_date" readonly="readonly" type="text" value="" id="valid_time" name="valid_time"  /></td>
      </tr>
      <tr>
        <th class="paddingT15"> {$lang.purpose}:</th>
        <td class="paddingT15 wordSpacing5"><select name="purpose">
					{foreach key=key item=item from=$cfg_pointcard.purpose}
            <option value="{$key}">{$item}</option>
					{/foreach}
					
          </select></td>
      </tr>
      <tr>
        <th class="paddingT15"> {$lang.use_range}:</th>
        <td class="paddingT15 wordSpacing5"><select name="use_range">
					{foreach key=key item=item from=$cfg_pointcard.use_range}
            <option value="{$key}">{$item}</option>
					{/foreach}
					
          </select></td>
      </tr>
        <tr>
            <th class="paddingT15"> {$lang.add_time}:</th>
            <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" readonly="readonly" type="text" name="add_time" value="{$time|date}" /></td>
        </tr>
      <tr>
        <th></th>
        <td class="ptb20"><input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
          <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" /></td>
      </tr>
    </table>
  </form>
</div>
{include file="footer.html"} 